package com.itnoob.command1.test2;

/**
 * @author zhoujun
 * @date 2025/3/18 23:04
 */
public class Client {

    public static void main(String[] args) {
        //创建一个接收者对象
        Light light = new Light();
        //创建一个命令对象,将接收者传给它
        Command command = new LightOnCommand(light);
        //创建一个请求者对象,将命名传给它
        RemoteControl remoteControl = new RemoteControl(command);

        remoteControl.pressButton();
    }
}
